<?php
namespace Admin\Controller;
class IndexController extends AdminController {
    //首页
    public function index(){
		$this->theme($this->template)->display('/index');
    }
    //顶部菜单
    public function top(){
        $userModel = D('user');
        //查询是否有未读信息
        $msg_mount = $userModel->getNewMsgMount($this->admin_user['user_id']);
        //模版赋值
        $this->assign('msg_mount',$msg_mount);
        $this->theme($this->template)->display('/top');
    }
    //后台主页
    public function home(){
        $userModel       = D('user');
        $home            = $userModel->getUserHome($this->system_edition,$this->admin_user);
        $this->assign('home',$home);
        $this->theme($this->template)->display('/home');
    }
    //左侧菜单
    public function menu(){
        //获得左侧菜单
        $userModel = D('user');
        $menu = $userModel->getUserMenu($this->admin_user);
        //模版赋值
        $this->assign('menu',$menu);
        $this->theme($this->template)->display('/menu');
    }
}